#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "GameModel.h"

class GomokuMainWindow : public QMainWindow
{
    Q_OBJECT

public:
    GomokuMainWindow(QWidget *parent = nullptr);
    ~GomokuMainWindow();

protected:
    void paintEvent(QPaintEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);

private:
    GomokuGameEngine *gameEngine;
    GomokuGameMode currentGameMode;
    int hoverRow, hoverCol;
    void setupNewGame();
    void verifyGameState(int y, int x);

private slots:
    void processHumanMove();
    void processAIMove();
    void startPvPGame();
    void startPvEGame();
};

#endif // MAINWINDOW_H
